<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let a = "￥89.00";
        let b = a.slice(-1, 3);
        console.log(b)
        // a 并没有发生变化，slice方法返回一个新的字符串
        console.log(a)
        // slice方法
        var strMatch = `-rw-r--r--. 1 root root   114769 Apr 26 15:39 CN_CM_SHANGHAI_24709063_M.mtl
                -rw-r--r--. 1 root root 2879642 Apr 26 15:39 CN_CM_SHANGHAI_2470190623_Q.obj`;
                var matchReg = /CN_.*?\.mtl/gi;
console.log(strMatch.match(matchReg));//输出 CN_CM_SHANGHAI_24709063_M.mtl
    </script>
</body>
</html>